package com.deep.deepenterpise.dao;

import com.deep.deepenterpise.model.entity.DrGoodsOrder;
import com.deep.deepenterpise.model.to.gas.DrAddOrderTo;
import com.deep.deepenterpise.model.to.unit.DrCarOrderPageTo;
import com.deep.deepenterpise.model.to.unit.DrCheckHouseOrderPageTo;
import com.deep.deepenterpise.model.vo.unit.DrCarOrderVo;
import com.deep.deepenterpise.model.vo.unit.DrCheckHouseOrderVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * @author xyz
 * @description 针对表【dr_goods_order(DR商品订单)】的数据库操作Mapper
 * @createDate 2024-06-04 13:22:49
 * @Entity com.deep.deepenterpise.model.entity.DrGoodsOrder
 */
public interface DrGoodsOrderMapper {
    List<DrAddOrderTo> findByDrUnitKeySynOrderNoIsNull(@Param("drUnitKey") String drUnitKey);

    Long countByDrMasterOrderNum(@Param("drMasterOrderNum") String drMasterOrderNum);

    void insert(DrGoodsOrder drGoodsOrder);

    Long countByPage(DrCheckHouseOrderPageTo drCheckHouseOrderPageTo);

    List<DrCheckHouseOrderVo> findByPage(RowBounds rowBounds, DrCheckHouseOrderPageTo drCheckHouseOrderPageTo);

    DrGoodsOrder findByDrMasterOrderNum(@Param("drMasterOrderNum") String drMasterOrderNum);

    void updateByDrMasterOrderNum(@Param("drMasterOrderNum") String drMasterOrderNum,
                                  @Param("drCreateTime") Long drCreateTime,
                                  @Param("drSecurity") Integer drSecurity,
                                  @Param("drPayStatus") Integer drState);

    Long countByDrMemberIdAndDrOrderTypeAndDrFirst(@Param("drMemberId") Integer drMemberId,
                                                   @Param("drOrderType") Integer drOrderType,
                                                   @Param("drFirst") Integer drFirst);

    List<DrCarOrderVo> findDrCarOrderVoByPage(RowBounds rowBounds, DrCarOrderPageTo drCarOrderPageTo);

    Long countByDrCarOrderVoByPage(DrCarOrderPageTo drCarOrderPageTo);

    List<DrAddOrderTo> findErrByDrUnitKeySynOrderNoIsNull(@Param("drUnitKey") String drUnitKey);
}




